//
//  main.c
//  hhuc
//
//  Created by 杨霖韬 on 2018/10/24.
//  Copyright © 2018 杨霖韬. All rights reserved.
//
#include<stdio.h>
#include<math.h>
int main()
{
    int n,b,i,t,a=0,c=1;
    printf("2");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        scanf("%d",&b);
        c = 1;
        for(t=2;t<=sqrt((double)b);t++)
        {
            if(b%t==0)
            {
                c=0;
                break;
            }
        }
        if(c==1 || b == 2)
            a+=1;
    }
    printf("%d",a);
    return  0;
}
